<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" th:href="@{/css/base.css}"/>
    <link rel="stylesheet" th:href="@{/css/info-reg.css}"/>
    <title>选课系统</title>
</head>
<body>
<div class="title">
    <h2>课程信息添加(*为必填项)</h2>
</div>
<form id="fm" method="post" action="/course/add">
    <div class="main">
        <p class="short-input ue-clear">
            <label>*课程名称：</label>
            <input name="courseName" type="text" />
        </p>
        <p class="short-input ue-clear">
            <label>*任课老师：</label>
            <input name="teacher" type="text" />
        </p>
        <p class="long-input ue-clear">
            <label>*课程学分：</label>
            <input name="courseScore" type="text"/>
        </p>
        <p class="long-input ue-clear">
            <label>总人数：</label>
            <input name="totalCount" type="text" />
        </p>
        <p class="long-input ue-clear">
            <label>上课地址：</label>
            <input name="address" type="text" />
        </p>
        <p class="long-input ue-clear">
            <label>*开始时间：</label>
            <input name="startTime" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
        </p>
        <p class="long-input ue-clear">
            <label>*结束时间：</label>
            <input name="endTime" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
        </p>
        <p class="short-input ue-clear">
            <label>课程描述：</label>
            <textarea name="description" style="height:150px"></textarea>
        </p>
        <div class="btn ue-clear">
            <input style="height:50px;width:150px;background-color:#68B86C;color:white;border-radius:10px" type="submit" value="添加"/>
        </div>
    </div>
</form>
</body>
<script type="text/javascript" th:src="@{/js/jquery.js}"></script>
<script type="text/javascript" th:src="@{/js/common.js}"></script>
<script type="text/javascript" th:src="@{/js/WdatePicker.js}"></script>
<script type="text/javascript" th:src="@{/js/jquery.validate.min.js}"></script>
<script type="text/javascript">
    $("#fm").validate({
        rules: {
            courseName: {
                required: true
            },
            phone: {
                required: true
            }
        },
        messages: {
            courseName: {
                required: "*不能为空！"
            },
            phone: {
                required: "*不能为空！"
            }
        }
    });
</script>

</html>
